file(
  GLOB_RECURSE
  PROJECT_TEST_SRC_LIST
  ${CMAKE_CURRENT_LIST_DIR}/*.cpp
  ${CMAKE_CURRENT_LIST_DIR}/*.cc
  ${CMAKE_CURRENT_LIST_DIR}/*.cxx)

foreach(FILE ${PROJECT_TEST_SRC_LIST})
    STRING(REGEX REPLACE ".+/(.+)\\..*" "\\1" FILE_NAME ${FILE})
    add_executable (${FILE_NAME} ${FILE})
    target_link_libraries(${FILE_NAME} MyRpc)
endforeach()